<template>
  <div :class="[`player-list`, `player-list-${theme}`]">
    <div class="list_wrap">
      <div class="list_top">
        <h4>播放列表</h4>
        <i class="vbestui-iconfont icon-close" @click="close"></i>
      </div>
      <div>
        <scroll class="scroll" ref="scroll">
          <song-list
            :now-index="cindex"
            :isplayer="true"
            :isAlbum="true"
            :song-list="list"
          ></song-list>
        </scroll>
      </div>
    </div>
  </div>
</template>
<script>
import { theme } from '../mixin/global/theme'
import songList from '../components/Songlist/song-list.vue'
import scroll from '../components/scroll/scroll.vue'
export default {
  mixins: [theme],
  props: ['list', 'cindex'],
  components: { songList, scroll },
  methods: {
    close () {
      this.$emit('close')
    }
  }
}
</script>
<style lang="less">
.scroll {
  height: 500px;
}
.player-list {
  width: 500px;
  height: 500px;
  border-radius: 6px;
  overflow-y: auto;
  position: absolute;
  box-shadow: 0 0 2px var(--border-tt);
  z-index: 999;
  top: -500px;
  right: 0px;
  .list_top {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    i {
      font-size: 30px;
    }
  }
  &-dark {
    background: var(--dark-bg-color);
  }
  &-light,
  &-green {
    background: #fff;
  }
  h4 {
    text-align: center;
  }
  &-top {
    height: 35px;
  }
}
</style>
